Motf ResetTracking

Disables tracking if active, and reset all counters used in the MOTF control system. The counters are enabled for counting from this zeroed position.

Syntax

ResetTracking()

 

Copy
Example
-- This sample marks a series of circles spaced at a constant distance
SetUnits(Units.Millimeters)
-- Use MOTF Port 0
MOTF.Mode = Encoder.ExternalSingleAxis
-- Web direction
MOTF.Direction = Direction.BottomToTop
-- 10um linear resolution for example
encoderLinResInMmPerCount = 0.010
-- Bits/Mm * Mm/Count -> Bits/Count
MOTF.CalFactor = System.CalFactorY *
encoderLinResInMmPerCount

-- Initialize the MOTF settings
MOTF.Initialize()

-- Initialize laser/scan-head settings
Laser.MarkSpeed = 1000
Laser.MarkDelay = 200
Laser.JumpSpeed = 3000
Laser.JumpDelay = 200
Laser.Frequency = 20
Laser.DutyCycle1 = 50
Laser.Power = 50
Laser.LaserOnDelay = 75
Laser.LaserOffDelay = 125
Laser.PolyDelay = 50
Laser.VariPolyDelayFlag = true

-- Wait for this web travel before marking
partDistance = 50.

-- Wait for start signal
IO.WaitForIo(Pin.Din.UserIn1,Trigger.Edge.Rising, 0, 0, true)

-- Initialize to wait the initial distance
MOTF.ResetTracking()
System.Flush()
-- Repeat until aborted via external signal
while IO.ReadPin(Pin.Din.UserIn4) == false do
    MOTF.WaitForDistance(partDistance)
    -- Counters are automatically reset when WaitForDistance() releases
    MOTF.StartTracking(Tracking.WhileMarking)
    Image.Circle(0, 0, 20)
    MOTF.StopTrackingAndJump(0, 0, 0, 200)
    Laser.WaitForEnd()
    -- Counters are still counting and distance being measured
end

Report ("Job Finished")